import Layout from '@/layout'

/* 超级管理员路由模块 */
const superRouter = [
    /* 系统首页 */
    {
        path: '/manager',
        name: 'Manager',
        component: Layout,
        redirect: '/manager/index',
        meta: {
            title: '系统首页',
            icon: 'peoples',
            roles: ['PA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/index'),
            name: '/manager/index',
            meta: {
                title: '系统首页',
                icon: 'home',
            }
        }]
    },
    /* 金融风控分析 */
    {
        path: '/analysis',
        name: 'Analysis',
        component: Layout,
        redirect: '/analysis/basics',
        meta: {
            title: '金融风控分析',
            icon: 'home',
            roles: ['PA']
        },
        children: [{
            path: 'basics',
            component: () => import('@/views/roles/admin/analysis/basics'),
            name: '/analysis/basics',
            meta: {
                title: '贷款基本面',
            }
        },{
            path: 'badBasics',
            component: () => import('@/views/roles/admin/analysis/badBasics'),
            name: '/analysis/badBasics',
            meta: {
                title: '不良贷款风险',
            }
        },{
            path: 'guarantee',
            component: () => import('@/views/roles/admin/analysis/guarantee'),
            name: '/analysis/guarantee',
            meta: {
                title: '融资担保',
            }
        },{
            path: 'details',
            component: () => import('@/views/roles/admin/analysis/details'),
            name: '/analysis/details',
            meta: {
                title: '风控明细',
            }
        }]
    },
    /* 企业评分管理 */
    {
        path: '/s_coreManage',
        name: 'ScoreManage',
        component: Layout,
        redirect: '/s_coreManage/target',
        meta: {
            title: '企业评分管理',
            icon: 'customer',
            roles: ['PA'],
        },
        children: [/* {
                path: 'target',
                name: '/s_coreManage/target',
                component: () => import('@/views/gradManage/targetManage/index'),
                meta: {
                    title: '指标管理',
                }
            },
            {
                path: 'rule',
                name: '/s_coreManage/rule',
                component: () => import('@/views/gradManage/ruleManage/index'),
                meta: {
                    title: '模型管理（超管）',
                }
            }, */
            {
                path: 'ruleAdmin',
                name: '/s_coreManage/ruleAdmin',
                component: () => import('@/views/gradManage/ruleManageAdmin/index'),
                meta: {
                    title: '模型管理',
                }
            },
            {
                path: 'qScore',
                name: '/s_coreManage/qScore',
                component: () => import('@/views/gradManage/scoresQuery/index'),
                meta: {
                    title: '评分查询',
                }
            },
            {
                path: 'define',
                name: '/s_coreManage/define',
                component: () => import('@/views/gradManage/defineManage/index'),
                meta: {
                    title: '定义管理',
                }
            }
        ]
    },
    /* 企业画像 */
    {
        path: '/portray',
        name: 'Portray',
        component: Layout,
        redirect: '/portray/index',
        meta: {
            title: '企业画像',
            icon: 'portrait',
            roles: ['PA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/portray'),
            name: '/portray/index',
            meta: {
                title: '画像查询',
            }
        }]
    },
    /* 企业画像1 */
    {
        path: '/portray1',
        name: 'Portray1',
        component: Layout,
        redirect: '/portray1/index',
        meta: {
            title: '企业画像',
            icon: 'portrait',
            roles: ['PA','BA','CREDIT','CREDIT_ADMIN','GOV','CM']
        },
        children: [
            {
                path: 'index',
                component: () => import('@/views/dashboard/portray1'),
                name: '/portray1/index',
                meta: {
                    title: '画像查询',
                }
            },
            {
                path: 'companyMessage',
                component: () => import('@/views/dashboard/modules/companyMessage'),
                name: '/portray1/companyMessage',
                meta: {
                    title: '企业信息',
                },
                hidden:true
            },
            {
                path: 'riskReport',
                component: () => import('@/views/dashboard/modules/riskReport'),
                name: '/portray1/riskReport',
                meta: {
                    title: '风控报告',
                },
                hidden:true
            },
            {
                path: 'selfRisk',
                component: () => import('@/views/dashboard/modules/selfRisk'),
                name: '/portray1/selfRisk',
                meta: {
                    title: '自身风险',
                },
                hidden:true
            },
            {
                path: 'relativeRisk',
                component: () => import('@/views/dashboard/modules/relativeRisk'),
                name: '/portray1/relativeRisk',
                meta: {
                    title: '关联风险',
                },
                hidden:true
            },
            {
                path: 'consensus',
                component: () => import('@/views/dashboard/modules/consensus'),
                name: '/portray1/consensus',
                meta: {
                    title: '查看舆情',
                },
                hidden:true
            }
        ]
    },
    /* 企业评估 */
    {
        path: '/assess',
        name: 'Assess',
        component: Layout,
        redirect: '/assess/index',
        meta: {
            title: '企业评估',
            icon: 'portrait',
            roles: ['PA']
        },
        children: [{
            path: 'index',
            component: () => import('@/views/dashboard/assess'),
            name: '/assess/index',
            meta: {
                title: '企业评估',
            }
        }]
    },
    /* 风险预警 */
    {
        path: '/credit',
        name: 'Credit',
        component: Layout,
        redirect: '/credit/extend_list',
        meta: {
            title: '风险预警',
            icon: 'credit',
            roles: ['PA'],
        },
        children: [{
            path: 'extend_list',
            component: () => import('@/views/roles/editor/customer/credit'),
            name: '/credit/extend_list',
            meta: {
                title: '风险预警',
            }
        }]
    },
    /* 预警推送管理 */
    {
        path: '/warnPush',
        name: 'WarnPush',
        component: Layout,
        redirect: '/warnPush/extend_list',
        meta: {
            title: '预警推送管理',
            icon: 'credit',
            roles: ['PA','BA','CREDIT','CREDIT_ADMIN','GOV','CM']
        },
        children: [{
            path: 'extend_list',
            component: () => import('@/views/roles/editor/customer/warnPush'),
            name: '/warnPush/extend_list',
            meta: {
                title: '预警推送管理',
            }
        }]
    },
    /* 额度查询 */
    {
        path: '/limit',
        name: 'Limit',
        component: Layout,
        redirect: '/limit/credit_list',
        meta: {
            title: '额度查询',
            icon: 'limit',
            roles: ['PA'],
        },
        children: [{
            path: 'credit_list',
            component: () => import('@/views/roles/editor/customer/limit'),
            name: '/limit/credit_list',
            meta: {
                title: '额度查询',
            }
        }]
    },

    /* 系统权限 */
    {
        path: '/s_permission',
        name: 'SPermission',
        component: Layout,
        redirect: '/s_permission/target',
        meta: {
            title: '系统权限',
            icon: 'super',
            roles: ['PA'],
        },
        children: [
            {
                path: 'target',
                name: '/s_permission/target',
                component: () => import('@/views/gradManage/targetManage/index'),
                meta: {
                    title: '指标管理',
                }
            },{
                path: 'rule',
                name: '/s_permission/rule',
                component: () => import('@/views/gradManage/ruleManage/index'),
                meta: {
                    title: '模型管理',
                }
            },{
                path: 'institution_list',
                name: '/s_permission/institution_list',
                component: () => import('@/views/roles/super/institution'),
                meta: {
                    title: '组织机构',
                }
            },
            {
                path: 'user_list',
                name: '/s_permission/user_list',
                component: () => import('@/views/roles/super/user'),
                meta: {
                    title: '用户管理',
                }
            },
            {
                path: 'role_list',
                name: '/s_permission/role_list',
                component: () => import('@/views/roles/super/role'),
                meta: {
                    title: '角色管理',
                }
            },
            {
                path: 'resource_list',
                name: '/s_permission/resource_list',
                component: () => import('@/views/roles/super/resource'),
                meta: {
                    title: '资源管理',
                }
            },
            {
                path: 'system_dictionary',
                name: '/s_permission/system_dictionary',
                component: () => import('@/views/roles/super/dict'),
                meta: {
                    title: '系统字典',
                }
            },
            // {
            //     path: 'system_logs',
            //     name: '/s_permission/system_logs',
            //     component: () => import('@/views/roles/super/logs'),
            //     meta: {
            //         title: '系统日志',
            //     }
            // },

        ]
    },
]

export default superRouter
